<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="keywords" th:content="${collect.title + ',jvm123,常用api,IT系列教程,在线工具,博客,常用工具,jvm123博客,开发参考文档'}"/>
    <meta name="description" th:content="${collect.title + ',' + collect.content + '。jvm123是一个java技术分享站，内容涉及java、jvm、程序开发，单元测试框架Spock教程，测试视频教程，spring框架教程等，以及服务器搭建、linux、docker等相关技术。此外，本站还开源了excel数据在java系统的导入导出的excel-converter项目，最少使用一行代码导入导出excel，已发布在maven中央仓库。'}"/>
    <title th:text="${collect.title + '-Java技术分享站'}"></title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"/>
    <!-- Custom styles for this page -->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <style>
        .item {
            padding: 15px 10px;
        }
        .thumbnail {
            max-width: 100%;
            border-radius: 5px;
        }
    </style>
</head>
<body>
<header th:replace="fragment/header::header"></header>

<main role="main">
    <section th:replace="fragment/banner::banner"></section>

    <div class="container py-5 bg-light">
        <div class="row item">
            <div class="col-md-12">
                <p>了解更多请访问：
                    <a th:href="${collect.blogUrl}" th:text="${collect.blogUrl}" target="_blank"></a>
                </p>
                <form class="form-inline" action="#" th:action="@{/admin/collect/relate}" method="post">
                    <!--<input name="id" type="hidden" th:value="${collect.id}"/>-->
                    <!--<div class="form-group">-->
                        <!--<label for="tag">tag:</label>-->
                        <!--<input id="tag" name="tag" class="form-control" type="text"/>-->
                    <!--</div>-->
                    <!--<div class="form-group">-->
                        <!--<label for="category">category:</label>-->
                        <!--<input id="category" name="category" class="form-control" type="text"/>-->
                    <!--</div>-->
                    <!--<input type="submit" class="btn btn-primary" value="relate"/>-->
                    <input name="id" type="hidden" th:value="${collect.id}"/>
                    <input placeholder="tag" id="tag" name="tag" class="form-control" type="text"/>
                    <input placeholder="category" id="category" name="category" class="form-control" type="text"/>
                    <input type="submit" class="btn btn-primary" value="relate"/>
                </form>
            </div>
        </div>
        <div class="row item" th:each="post : ${collect.postList}" >
            <div class="col-md-8">
                <a style="color: #212529; text-decoration: none" th:href="${'/post/' + post.id + '/' + post.postName + '.html'}" target="_blank">
                    <h2 th:text="${post.postTitle}" class=""></h2>
                    <!--<p class="card-text" th:text="${post.postContent}"></p>-->
                </a>
                <p class="card-text">
                    分类：<a class="category" th:each="ca : ${post.categorys}" th:href="${'/category/' + ca.slug + '.html'}" th:text="${ca.name}"></a>
                    <br/>
                    标签：<a class="tag" th:each="tag : ${post.tags}" th:href="${'/tag/' + tag.slug + '.html'}" th:text="${tag.name}"></a>
                </p>
                <div class="d-flex justify-content-between align-items-center">
                    <div class="btn-group">
                        <a th:href="${'/post/' + post.id + '/' + post.postName + '.html'}" target="_blank" class="btn btn-sm btn-outline-secondary">预览</a>
                        <a th:href="${'http://jvm123.com' + #dates.format(post.postDate, '/yyyy/MM/') + post.postName + '.html'}" target="_blank" class="btn btn-sm btn-outline-secondary">更多</a>
                    </div>
                    <small class="text-muted" th:text="${post.postDate}"></small>
                </div>
            </div>
            <div class="col-md-2">
                <form action="#" th:action="@{/admin/collect/remove/relation}" method="post">
                    <input name="collectId" th:value="${collect.id}" type="hidden"/>
                    <input name="postId" th:value="${post.id}" type="hidden"/>
                    <input type="submit" class="btn btn-danger" value="删除"/>
                </form>
            </div>
            <div class="col-md-2">
                <img class="thumbnail" th:src="${post.thumbnail}" th:alt="${post.postTitle + '  ' + post.postName}"/>
            </div>
            <div class="col-md-12">
                <hr/>
            </div>
        </div>
    </div>

</main>

<footer th:replace="fragment/footer::footer"></footer>
<script th:replace="fragment/baiduPush::baidu-push"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
